notebook: Add .dnd style class to tabs during reorder
authorBenjamin Otte <otte@redhat.com>
Mon, 11 Jan 2016 16:46:15 +0000 (17:46 +0100)
committerBenjamin Otte <otte@redhat.com>
Mon, 11 Jan 2016 16:46:15 +0000 (17:46 +0100)
gtk/gtknotebook.c

index 426281f24ce5e7a583bb74366dd4a2b5b142646b..135c3eb7e1d8095e85def7b5c2d16efa44476995 100644 (file)
@@ -2982,6 +2982,7 @@ show_drag_window (GtkNotebook        *notebook,
   gtk_widget_set_parent_window (page->tab_label, priv->drag_window);
   gtk_widget_set_child_visible (page->tab_label, TRUE);
   g_object_unref (page->tab_label);
+  gtk_css_gadget_add_class (page->gadget, GTK_STYLE_CLASS_DND);
 
   /* the grab will dissapear when the window is hidden */
   gdk_seat_grab (gdk_device_get_seat (device), priv->drag_window,
@@ -3016,6 +3017,8 @@ hide_drag_window (GtkNotebook        *notebook,
       g_object_unref (page->tab_label);
     }
 
+  gtk_css_gadget_remove_class (page->gadget, GTK_STYLE_CLASS_DND);
+
   if (priv->drag_window &&
       gdk_window_is_visible (priv->drag_window))
     gdk_window_hide (priv->drag_window);